<template>
  <div class="top">
    <el-row :gutter="62">
      <el-col :span="12">
        <div class="grid-content bg-purple">
          <h3>网站标题</h3>
          <el-input
            v-model="text"
            maxlength="20"
            placeholder="请输入网站标题"
            type="text"
          >
          </el-input>
          <p>最多可输入20字</p>
        </div>
      </el-col>
      <el-col :span="12">
        <div class="grid-content bg-purple right-content">
          <div class="update">
            <img src="../../../assets/images/update.png" alt="" />
          </div>
          <div class="right">
            <h3>网站LOGO</h3>
            <p>仅限JPG、PNG、GIF格式，最大文件限制3M</p>
            <el-upload
              class="upload-demo"
              action="https://jsonplaceholder.typicode.com/posts/"
              :on-change="handleChange"
              :file-list="fileList"
            >
              <el-button type="primary">点击上传</el-button>
            </el-upload>
          </div>
        </div>
      </el-col>
    </el-row>
  </div>
  <div class="footer">
    <el-row :gutter="62">
      <el-col :span="24">
        <div class="grid-content bg-purple">
          <h3>网站描述</h3>
          <el-input
            v-model="textarea"
            placeholder="请输入网站简介"
            type="textarea"
            rows="6"
            resize="none"
          />
          <div class="footBtn">
            <button>重置</button>
            <button>取消</button>
            <button>保存</button>
          </div>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { ref } from "vue";
import { ElCol, ElRow, ElInput, ElUpload, ElButton } from "element-plus";
export default {
  setup() {
    // const size = ref(-2);
    const text = ref("");
    const textarea = ref("");
    return {
      // size,

      text,
      textarea,
    };
  },

  components: {
    ElCol,
    ElRow,
    ElInput,
    ElUpload,
    ElButton,
  },
};
</script>

<style lang="less" scoped>
.top {
  height: 358px;
  margin-top: 31px;
  margin-right: 36px;
  .el-row {
    margin-bottom: 20px;
  }
  .el-row:last-child {
    margin-bottom: 0;
  }
  .el-col {
    border-radius: 4px;
  }
  .bg-purple {
    background: #fff;
  }
  .grid-content {
    border-radius: 10px;
    min-height: 330px;
    padding-top: 50px;
    h3 {
      font-size: 24px;
      margin: 0px 0 40px 50px;
    }
    /deep/ .el-input {
      height: 60px;
    }
    /deep/ .el-input__inner {
      height: 60px !important;
      margin: 0 50px;
    }
    p {
      float: right;
      margin: 10px 50px 50px 0;
    }
  }
  .right-content {
    display: flex;
    .update {
      width: 210px;
      height: 210px;
      background-color: #d9e2c8;
      margin-left: 50px;
      position: relative;
      img {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
      }
    }
    .right {
      h3 {
        margin-bottom: 20px;
      }
      p {
        margin-top: 0;
        margin-left: 50px;
        display: block;
        float: left;
      }
      button {
        width: 133px;
        height: 50px;
        background-color: #f19149;
        border: none;
        color: #fff;
        font-size: 18px;
        margin: 0px 0 0 50px;
        display: block;
      }
    }
  }
  .row-bg {
    padding: 10px 0;
    background-color: #f9fafc;
  }
}
.footer {
  height: 375px;
  margin-top: 41px;
  margin-right: 36px;
  .el-col {
    border-radius: 4px;
  }
  .grid-content {
    border-radius: 10px;
    min-height: 369px;
    padding-top: 50px;
    padding: 50px 50px 0;
    h3 {
      font-size: 24px;
      margin: 0px 0 40px 0px;
    }
  }
  .bg-purple {
    background: #fff;
  }
  .footBtn {
    float: right;
    margin-top: 10px;
    button {
      width: 100px;
      height: 50px;
      background-color: #d9e2c8;
      border: none;
      color: #fff;
      margin-left: 10px;
    }
  }
}
</style>
